package com.demo.store.remote;

import com.demo.common.base.constant.SysServiceConstant;
import com.demo.common.base.pojo.JsonRes;
import com.demo.common.feign.config.FeignHeaderConfiguration;
import com.demo.store.bo.CreateStoreBO;
import com.demo.store.vo.StoreMainVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(contextId = "remoteStoreMainService" ,value = SysServiceConstant.DEMO_STORE_API,configuration = FeignHeaderConfiguration.class)
public interface RemoteStoreMainService {

    @GetMapping("/storeMain/getOneStoreMain")
    JsonRes<StoreMainVO> getOneStoreMain(@RequestParam("id") Long id);

    @PostMapping("/storeMain/createStore")
    JsonRes<Void> createStore(@RequestBody CreateStoreBO createStoreBO);
}
